<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script type="text/javascript" src="/jquery-1.8.3.min.js"></script>
    <meta name="_token" content="{{ csrf_token() }}"/>
</head>
<body>
<script>
    $(function(){
        //发送ajax查询分组
        $.get("../card/classid?id="+{{ session('admin')['id'] }},function($data){
            for(var i in $data){
                for(var c in $data[i]){
                    $("#sel").append('<option value="' + $data[i][c] + '">' + $data[i][c] + '</option>');
                }
            }
        })
    });
</script>
<center>
    <h1>名片添加</h1>
    <a href="/mindcard/public/admin/index">名片列表</a> | <a href="/mindcard/public/card/insert">名片添加</a>
    <br><br>
    <hr>
</center>
<form action="/mindcard/public/card/add" method="post">
    <input type="hidden" name="id" value="{{ session('admin')['id'] }}">
    <input type="hidden" name="_token" value="{{ csrf_token() }}">
    <center>
        <table>
            <tr>
                <th>名字：</th>
                <td><input type="text" name="name"><br></td>
            </tr>
            <tr>
                <th>职位：</th>
                <td><input type="text" name="position"><br></td>
            </tr>
            <tr>
                <th>公司名字：</th>
                <td><input type="text" name="company"><br></td>
            </tr>
            <tr>
                <th>地址：</th>
                <td><input type="text" name="address"><br></td>
            </tr>
            <tr>
                <th>手机号：</th>
                <td><input type="text" name="cell"><br></td>
            </tr>
            <tr>
                <th>网址：</th>
                <td><input type="text" name="url"><br></td>
            </tr>
            <tr>
                <th>邮箱：</th>
                <td><input type="text" name="email"><br></td>
            </tr>
            <tr>
                <th>所属分组：</th>
                <td>
                    <select name="class" id="sel">
                        <option value="未分组">--请选择分组--</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td><input type="submit" value="添加"></td>
            </tr>
        </table>
    </center>
</form>
</body>
</html>